package com.eastcode.base.persistence;

import com.eastcode.dictionary.entity.Dictionary;
import com.eastcode.mobile.server.system.entity.User;
import com.eastcode.mobile.server.user.entity.CallLog;
import com.eastcode.mobile.server.user.entity.Contact;
import com.eastcode.mobile.server.user.entity.Location;
import com.eastcode.mobile.server.user.entity.Sms;
import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyService;

public final class Manager {

	private static Objectify objectify = ObjectifyService.begin();
	static {
		ObjectifyService.register(Dictionary.class);
		ObjectifyService.register(Sms.class);
		ObjectifyService.register(CallLog.class);
		ObjectifyService.register(Contact.class);
		ObjectifyService.register(Location.class);
		ObjectifyService.register(User.class);
	}

	/**
	 * 获取持久化对象
	 * 
	 * @return
	 */
	public static Objectify getPersistenceManager() {
		return objectify;
	}

}